package com.cema.manage.project.util;


import com.cema.manage.project.util.wechat.ResourceUtil;

/**
 * 作者: @author Harmon <br>
 * 时间: 2017-08-11 08:58<br>
 * 描述: ApiUserUtils <br>
 */
public class ApiUserUtils {

    //替换字符串
    public static String getCode(String APPID, String REDIRECT_URI, String SCOPE) {
        return String.format(ResourceUtil.GETCODE, APPID, REDIRECT_URI, "snsapi_userinfo");
    }

    //替换字符串
    public static String getWebAccess(String CODE) {
        return String.format(ResourceUtil.WEBACCESSTOKENHTTPS,ResourceUtil.APP_ID,
                ResourceUtil.SECRET,
                CODE);
    }
    //替换字符串
    public static String getAccestoken(String CODE) {
        return String.format(ResourceUtil.ACCESS_TOKEN,ResourceUtil.APP_ID,
                ResourceUtil.SECRET,
                CODE);
    }    //替换字符串
    public static String getUserInfo(String access_token,String open_id) {
        return String.format(ResourceUtil.USERMESSAGE,access_token,
                ResourceUtil.SECRET,
                open_id);
    }

//    //替换字符串
//    public static String getUserMessage(String access_token, String openid) {
//        return String.format(ResourceUtil.UserVo, access_token, openid);
//    }
}